<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="white" />
    <title></title>
    <link rel="stylesheet" href="../public/css/weui.css" />
    <link rel="stylesheet" href="../public/css/jquery-weui.css">
    <link rel="stylesheet" href="../public/css/common.css" />
    <link rel="stylesheet" href="css/index.css" />
    <style>
        [v-cloak]{
            display: none;
        }
    </style>
</head>
<body style="background: #FFFFFF;">
<div id="digindex">
    <div>
        <div style="height: 1.8rem;"></div>
        <div class="public_top_header">
            <a class="weui-cell">
                <div class="weui-cell__hd">
                    <img src="../public/images/yunkuanglogo.png" />
                </div>
                <div class="weui-cell__bd" style="margin-left: 0.2rem;">升级矿机</div>
            </a>
        </div>
    </div>
    <div class="digindex-mill-list" :class="{'showajax':showbuymill,'hideajax':!showbuymill}">
        <div class="item" v-for="item in milllist">
            <img class="mill-img" :src="'..'+item.millPhoto" />
            <div class="weui-cell digindex-mill-earnings" v-cloak>
                <div class="weui-cell__hd">{{item.name}}</div>
                <div class="weui-cell__bd">{{item.limitStart}}~{{item.limitEnd}}云币</div>
                <div class="weui-cell__ft" @click="jumpToCreate(item.name,item.id)">购买</div>
            </div>
            <div class="weui-cell digindex-mill-parameter" v-cloak>
                <div class="weui-cell__hd">算力天数:<span>{{item.daysNum}}</span>天</div>
                <div class="weui-cell__bd">收益:<span>{{item.rate*100}}</span></div>
                <div class="weui-cell__ft">每日算力:<span>{{item.arithmeticStrength}}</span></div>
            </div>
        </div>
    </div>
    <div style="height: 1.4rem;"></div>
    <div class="common-bottom">
        <ul>
            <li>
                <a href="index.html">
                    <div class="icon icon-1"></div>
                    <div class="text">首页</div>
                </a>
            </li>
            <li class="active">
                <a href="buymill.html">
                    <div class="icon icon-2"></div>
                    <div class="text">矿机</div>
                </a>
            </li>
            <li>
                <a href="#">
                    <div class="icon icon-3"></div>
                    <div class="text">钱包</div>
                </a>
            </li>
            <li>
                <a href="#">
                    <div class="icon icon-4"></div>
                    <div class="text">我的</div>
                </a>
            </li>
        </ul>
    </div>

</div>
<script type="text/javascript" src="../public/js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="../public/js/jquery-weui.js"></script>
<script type="text/javascript" src="../public/js/vue.js" ></script>
<script type="text/javascript" src="../public/js/font_size.js" ></script>
<script type="text/javascript" src="../public/js/common.js" ></script>
<script type="text/javascript">
    $(function(){
        var vm = new Vue({
            el:"#digindex",
            data: {
                showbuymill:true,
                milllist:[],
            },
            methods:{
                jumpToCreate:function(name,id){
                    local.saveData("milldetail",{
                        millname:name,
                        millid:id
                    })
                    window.location.href="./millupgradebuy.html";
                },
            },
            created:function(){
                AjaxRequest({
                    url:_url+"/money/mill/millall",
                    load:true,
                    type:"post",
                    success(res){
                        if(isReqSucceed(res))
                            vm.milllist=res.data;
                    }
                })
            }
        })
    })
</script>
</body>
</html>



